<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>服务详情</title>
		<script src="../js/mui.min.js"></script>
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="../css/style.css" />
		<link rel="stylesheet" href="../css/iconfont.css" />
		<link rel="stylesheet" href="../css/index.css" />
		<style>
			/*.mui-table-view-cell:after {
			   background-color:#fff
			}
			.xqy_pribox .xqy_pri {
			    font-size: 16px;
			    font-weight: bold;
			    color: #f84d4d;
			    padding-right: 1%;
			}*/
			
			.my_share {
				position: fixed;
				top: 0;
				bottom: 0;
				left: 0;
				right: 0;
				background: rgba(0, 0, 0, .8);
				text-align: right;
				z-index: 1000;
			}
			
			.share-tip .a-know {
				position: absolute;
				bottom: 30px;
				left: 50%;
				height: 40px;
				line-height: 40px;
				margin-left: -55px;
				padding: 0 30px;
				border: 1px solid #fff;
				color: #fff;
				text-align: center;
			}
			
			input[type="number"] {
				-moz-appearance: textfield;
			}
		</style>
	</head>

	<body>

		<header class="mui-bar mui-bar-nav show_bar_nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">服务详情</h1>
		</header>
		<div class="mui-content" id="sp">
			<div class="spxq_slider">
				<img id="img" src="images/noimage.jpg">
			</div>
			<div class="xqy_top">
				<div class="spxq_nambox clearfix">
					<div>
						<strong id="title" style="font-size:medium; text-align: center;"> </strong>
						<div class="spxq_fenx" onclick="javascript:$('#share-tip').show()" style="height:40px;">
							<span class="mui-icon mui-icon-paperplane"></span><br>分享</div>
					</div>
					<div class="xqy_klist clearfix">
						<p style="display: none;"></p>
						<p style="color: red;float: left; font-size: 14px;" id="yuan_price"></p>
						<em style="color: red;font-size: 16px;">元/<em class='unit'>斤</em></em>
					</div>
					<div class="xqy_klist clearfix">
						<p style="color: red;float: left; font-size: 14px;" id="hui_price"></p>
						<em style="color: red;font-size: 16px;">元/<em class='unit'>斤</em></em>
					</div>
					<div class="xqy_klist clearfix">
						<p style="float: left; font-size: 14px;" id="content_x"></p>
					</div>
					<div class="xqy_klist clearfix">
						<p>
							<span class="mui-badge" style="font-size: 12px;" id='add_time'></span><br/>
							<span class="mui-badge" style="margin-right: -100px;"><em class='end_time'></em></span>
						</p>
					</div>

					<div class="xqy_klist clearfix ">
						<p>
							<span class="mui-badge" style="font-size: 12px;" id='address'></span>
						</p>
					</div>
					<div class="xqy_klist clearfix ">
						<p>
							<span class="mui-badge" style="font-size: 12px;" id='info'></span>
						</p>
					</div>
				</div>

			</div>
			<div class="xqy_shopbox">
				<div class="shopbox_top clearfix">
					<div class="shopb_t_l clearfix">
						<div class="shopb_img"><img id="shop_logo" src="../images/head_default.gif"></div>
						<div class="shopb_info">
							<p class="shopb_nam" id="shop_name"></p>
							<p class="shopb_adre" id="goods_address"></p>
							<!--<p><span class="shopb_num"></span><div  id="goods_address" style="margin-tight:50px ;">店铺地址：</div></p>
							-->
						</div>
					</div>
					<div class="shopb_t_r">
						<p><span class="iconfont icon-shoucang guanzhu"></span></p>
					</div>
				</div>

				<div class="shopbox_btn" onclick="jd()">
					<a href="#" id="go_shop">农场逛逛</a>
				</div>
			</div>
			<!--<div class="xqy_pjbox" id="pj">
				<p class="xqy_pjicon"><span class="iconfont icon-pingjia"></span>评价</p>
				<div class="xqy_pjnr">
					<p class="xqy_pjbt">宝贝评价</p>
					<div class="xqy_pjnone" id="pingjia">该服务暂无评价~</div>
					<ul class="xqy_pjlist" id="cut_pinjia">
						<!--<li>
							<div class="xqy_pjlis_mem">
								<span class="xqy_pjlis_memtx"><img src="images/toux.jpg"></span>
								<span class="xqy_pjlis_memnam">龙**</span>
								<span class="pjstar star05"></span>
							</div>
							<div class="xqy_pjlis_time">
								<span>2017-04-15</span>
								<span>颜色：蓝色 </span>
								<span>大小：40</span>
							</div>
							<div class="xqy_pjlis_info">最爱这种款式，而且颜色也是最喜欢的黑白配，非常好。鞋子没问题，正品，只是包装有点简陋，鞋盒有点点被压的感觉，鞋子没事，还可以接受。</div>
						</li>-->
			<!--</ul>
					<div class="xqy_pjbtn evaluation" style="display: none;">
						<a href="evaluation.html" id="all_pinjia">查看全部评价</a>
					</div>
				</div>-->
			<!--</div>-->
			<div class="xqy_conbox" id="xq">
				<p class="xqy_pjicon"><span class="iconfont icon-tupian"></span>图文详情</p>
				<div class="xqy_nrnone" id="xq_goods">该服务还未上传详情~</div>
				<div class="xqy_spxq" id="summary">
					<!--<p><img src="images/cp01.jpg"></p>
					<p>阿迪达斯旗舰店阿迪达斯旗舰店阿迪达斯旗舰店阿迪达斯旗舰店阿迪达斯旗舰店</p>
					<p><img src="images/cp01.jpg"></p>
					<p><img src="images/cp01.jpg"></p>
					<p><img src="images/cp01.jpg"></p>
					<p>阿迪达斯旗舰店阿迪达斯旗舰店阿迪达斯旗舰店阿迪达斯旗舰店阿迪达斯旗舰店</p>-->
				</div>
			</div>
			<input type="hidden" id="goods_id">
			<input type="hidden" id="store_id">
			<input type="hidden" id="goods_type">
		</div>
		<div class="my_share share-tip" id="share-tip" style="display: none;">
			<img src="../images/qq1.png">
			<lable class="a-know" id="clostShare-tip" onclick="javascript:$('#share-tip').hide()">我知道了</lable>
			<a class="a-know" id="clostShare-tip" href="javascript:$('#share-tip').hide()">我知道了</a>
		</div>
	</body>

		<div id="footer"></div>
</html>
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script src="../js/app.js" type="text/javascript"></script>
<script type="text/javascript" src="../js/castapp.js"></script>
<script type="text/javascript" src="../js/layer/layer.min.js"></script>
<script>
	//获取服务信息
	var goods_id = getUrlParam('goods_id');
	get_navigation();
	var loading = layer.load(0, {
		shade: false,
		time: 1 * 1000
	});
	var shop_id = '';
	$.ajax({
		type: "post",
		url: APP.api_url + "goods/serve_show",
		data: {
			'goods_id': goods_id
		},
		dataType: 'jsonp',
		success: function(goods) {
			var good = goods.list;
			var member=goods.member;
			$('#title').text(good['title']);
			$('#yuan_price').text('原价：' + good['price1']);
			$('#hui_price').text('会员价：' + good['price2']);
			$('#content_x').text('详情：' + good['content']);
			$('#address').text('地址：' + good['address']);
			$('#add_time').text('开始时间：' + good['add_time']);
			$('.end_time').text('结束时间：' + good['end_time']);
			$('#info').text('简介：' + good['info']);
			$('#img').attr('src', APP.pic_url + good['images']);
			
			//追加图片详情
			for(var i = 1; i < good['pic'].length; i++) {
				$('#summary').append("<img src=" + APP.pic_url + good['pic'][i] + " id='goods_xq' /> <div style='height: 20px;'></div>")
			}
			if($('#goods_xq')) {
				document.getElementById('xq_goods').style.display = 'none';
			}

			document.getElementById("shop_logo").src = APP.pic_url + member['head_img'];
			document.getElementById("shop_name").innerHTML = member['nick_name'];
			shop_id = good['shop_id'];

		},

	});

	function jd() {
		localStorage.setItem('shop_id', shop_id); //存
		//var id=localStorage.getItem("shop_id");//取
		window.location.href = "../shop/shop.html";
	}

	//数量
</script>